
<link rel="stylesheet" type="text/css" href="/static/admin/css/style.css">

<style type="text/css">
    .books-info {
    width: 100%;
    height: 200px;
}
.books-contents {
    width: 100%;
    height: 500px;
    background: blue;
}

.books {
    width: 100%;
    height: auto;
}
.books tr td{
    /*border: 1px solid black;*/
    border-bottom: 1px solid black;
    padding-top: 10px;
}
.books tr th {
    text-align: left;
}
</style>

<div class="books-info">
    <div class="wrap">
        藏书共：本
    </div>
</div>
<div class="books-contents">
    <table class="books">
        <tr>
            <th>书名</th>
            <th>作者</th>
            <th>链接地址</th>
            <th>下载地址</th>
            <th>总字数</th>
            <th>分类标签</th>
            <th>状态</th>
            <th>编辑</th>
            <th>删除</th>
        </tr>
    {% for book in books %}
        <tr>
        <td>{{ book.name}}</td>
        <td>{{ book.author}}</td>
        <td><a href="{{ book.showUrl}}">查看</a></td>

        {% if book.downRul != None %}
            <td><a href="{{ book.downUrl}}">下载</a></td>
        {% else %}
            <td>暂无链接</td>
        {% endif %}

        {% if book.wordNum <= 0 %}
            <td>未知</td>
        {% else %}
            <td>{{ book.wordNum}}</td>
        {% endif %}

        <td>{{ book.booktype}}</td>
        <td>{{ book.state}}</td>
        <td><a href="/change_book">编辑</a></td>
        <td><a href="/detele_book">删除</a></td>
    </tr>
    {% endfor %}

    </table>
</div>

